package com.pay.service.Impl;

import com.pay.entity.ConsumerLog;
import com.pay.mapper.ConsumerLogMapper;
import com.pay.service.ConsumerLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class ConsumerLogServiceImpl implements ConsumerLogService {
    @Autowired
    private ConsumerLogMapper consumerLogMapper;

    @Override
    public ConsumerLog getByMsgIdConsumerLog(String messageId) {
        return consumerLogMapper.getByMsgIdConsumerLog(messageId);
    }

    @Override
    public int addWechatTemplateConsumerLog(String templateMsgId, String msgId) {
        ConsumerLog consumerLog = new ConsumerLog(msgId, templateMsgId);
        int result = consumerLogMapper.insert(consumerLog);
        return result;
    }
}